function isActive(obj) {
  var all = document.getElementsByClassName("classify");
  for (i = 0; i < all.length; i++) {
    all[i].style.borderBottom = "1px solid #e4e7ed";
    all[i].children[0].classList.remove("active");
  }
  obj.style.borderBottom = "1px solid #fff";
  obj.children[0].className += "active";

  var good = document.getElementsByClassName("good");
  for (j = 0; j < good.length; j++) {
    good[j].style.display = "none";
  }
  for (i = 0; i < all.length; i++) {
    if (all[i] == obj) {
      good[i].style.display = "block";
    }
  }
}

var cart = document.getElementsByClassName("add-cart");
cart[0].onclick = function(){
  alert("添加到购物车成功！");
}
